import Vue from 'vue'
import Router from 'vue-router'
import indexPage from '../pages/index'
import DetailPage from '../pages/Detail'
import bdPage from '../pages/detail/bdPage'
import modelPage from '../pages/detail/modelPage'
import musicPage from '../pages/detail/musicPage'
import aroundPage from '../pages/detail/aroundPage'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: indexPage
    },
    {
      path: '/detail',
      redirect: '/detail/bd',
      component: DetailPage,
      children:[
        {
          path: 'bd',
          component: bdPage
        },
        {
          path: 'model',
          component: modelPage
        },
        {
          path: 'music',
          component: musicPage
        },
        {
          path: 'around',
          component: aroundPage
        }
      ]
    }
  ]
})
